import com.dinmax.gustavoaguero.jackpot.*

class SLOTBridgeSpins {
	
	static function initSpins(parent:MovieClip, root:SLOTBridgeDummy){
		parent.mcCoins.onPress=function(){
			root.SWF_2_GAMESLOT_addBet(1);
		};
		parent.mcDeleteCoins.onPress=function(){
			this.gotoAndStop("prendido");
			root.SWF_2_GAMESLOT_deleteBet();
		};
		parent.mcDeleteCoins.onRollOver=function(){
			this.gotoAndStop("sobre");
		};
		parent.mcDeleteCoins.onRollOut=function(){
			this.gotoAndStop("apagado");
		};

		//botones del costado
		parent.mcBtnBet.onPress= function(){
			this.gotoAndStop("prendido");
			root.SWF_2_GAMESLOT_addBet(1);
		};
		parent.mcBtnBet.onRelease= function(){
			this.gotoAndStop("apagado");
		};
		parent.mcBtnBet5.onPress= function(){
			this.gotoAndStop("prendido");
			root.SWF_2_GAMESLOT_addBet(5);
		};
		parent.mcBtnBet5.onRelease= function(){
			this.gotoAndStop("apagado");
		};
		parent.mcBtnBetMin.onPress= function(){
			this.gotoAndStop("prendido");
			root.SWF_2_GAMESLOT_addBet(0, "min");
		};
		parent.mcBtnBetMin.onRelease= function(){
			this.gotoAndStop("apagado");
		};
		parent.mcBtnBetMax.onPress= function(){
			this.gotoAndStop("prendido");
			root.SWF_2_GAMESLOT_addBet(0, "max");
		};
		parent.mcBtnBetMax.onRelease= function(){
			this.gotoAndStop("apagado");
		};
		parent.mcBtnBetDelete.onPress= function(){
			this.gotoAndStop("prendido");
			root.SWF_2_GAMESLOT_deleteBet();
		};
		parent.mcBtnBetDelete.onRelease= function(){
			this.gotoAndStop("apagado");
		};
		parent.mcBtnSpin.onPress= function(){
			this.gotoAndStop("prendido");
			root.play();
		};
		parent.mcBtnSpin.onRelease= function(){
			this.gotoAndStop("apagado");
		};
		parent.mcBtnHelp.onPress= function(){
			this.gotoAndStop("prendido");
			//root.help();
		};
		parent.mcBtnHelp.onRelease= function(){
			this.gotoAndStop("apagado");
		};
		parent.mcBtnQuit.onPress= function(){
			this.gotoAndStop("prendido");
			root.SWF_2_GAMESLOT_gameLogOut();
		};
		parent.mcBtnQuit.onRelease= function(){
			this.gotoAndStop("apagado");
		};
	};
	
	static function blockButtons(parent:MovieClip){
		parent.palanca.enabled=false;
		parent.mcCoins.enabled=false;
		parent.mcDeleteCoins.enabled=false;
		parent.mcBtnBet.enabled=false;
		parent.mcBtnBet5.enabled=false;
		parent.mcBtnBetMin.enabled=false;
		parent.mcBtnBetMax.enabled=false;
		parent.mcBtnBetDelete.enabled=false;
		parent.mcBtnSpin.enabled=false;
		parent.mcBtnHelp.enabled=false;
		parent.mcBtnQuit.enabled=false;
	};

	static function unblockButtons(parent:MovieClip){
		parent.palanca.enabled=true;
		parent.mcCoins.enabled=true;
		parent.mcDeleteCoins.enabled=true;
		parent.mcBtnBet.enabled=true;
		parent.mcBtnBet5.enabled=true;
		parent.mcBtnBetMin.enabled=true;
		parent.mcBtnBetMax.enabled=true;
		parent.mcBtnBetDelete.enabled=true;
		parent.mcBtnSpin.enabled=true;
		parent.mcBtnHelp.enabled=true;
		parent.mcBtnQuit.enabled=true;
	};

}; // fin de clase